package com.illtamer.infinite.sillage.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.illtamer.infinite.sillage.pojo.Blog;
import com.illtamer.infinite.sillage.pojo.Tag;
import com.illtamer.infinite.sillage.vo.HomeBlog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BlogTagMapper {

    List<Tag> listThinTagByBlogId(@Param("id") Integer id);

    Page<HomeBlog> listHomeBlogByTagId(@Param("page") Page<Tag> page, @Param("tagId") Integer tagId);

    /**
     * 批量插入
     * */
    Boolean insertTagIdsByBlogId(@Param("blogId") Integer blogId, @Param("tags") List<Tag> tags);

    /**
     * 批量删除
     * */
    Boolean deleteTagIdsByBlogId(@Param("blogId") Integer blogId);

}
